package com.spc.demo.service;

import com.spc.demo.entiity.ActionOneIn;
import com.spc.demo.entiity.ActionTwoIn;
import com.spc.demo.entiity.BaseOut;
import com.spc.demo.executors.ActionOneExecutor;
import com.spc.demo.executors.ActionTwoExecutor;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

@Service
@AllArgsConstructor
public class ExternalServiceImpl implements ExternalService{
    private final ActionOneExecutor actionOneExecutor;

    private final ActionTwoExecutor actionTwoExecutor;
    @Override
    public BaseOut actionOne() {
        return actionOneExecutor.execute(new ActionOneIn());
    }

    @Override
    public BaseOut actionTwo() {
        return actionTwoExecutor.execute(new ActionTwoIn());
    }
}
